<%--
  Created by IntelliJ IDEA.
  User: Felix
  Date: 2017/8/4
  Time: 10:05
  To change this template use File | Settings | File Templates.
--%>
<%@ page contentType="text/html;charset=UTF-8" language="java" %>

<div id="seaBox" ng-hide="mySea">
    <div class="layui-form-item">
        <label class="layui-form-label">起运地</label>
        <div class="layui-input-inline">
            <select class="valName" name="departProvinceCode" ng-model="departProvinceCode" ng-options="x.code as x.name for x in data.areaList" ng-change="code()">
                <option value="">--选择省份--</option>
            </select>
        </div>
        <div class="layui-input-inline">
            <select class="valName" name="departCityCode" ng-model="departCityCode" ng-options="x.code as x.name for x in departCityList" ng-change="dcity()">
                <option value="">--选择城市--</option>
            </select>
        </div>
        <div class="layui-input-inline">
            <select class="valName" name="departCountyCode" ng-model="departCountyCode" ng-options="x.code as x.name for x in departCountyList">
                <option value="">--选择区县--</option>
            </select>
        </div>
        <div class="layui-inline">
            <label class="layui-form-label">承运方</label>
            <div class="layui-input-inline">
                <select class="valName" ng-model="carrierId" ng-options="x.carrierId as x.carrierName for x in data.carrierList" >
                    <option value="">--选择承运方--</option>
                </select>
            </div>
        </div>
    </div>
    <div class="layui-form-item">
        <label class="layui-form-label">目的地</label>
        <div class="layui-input-inline">
            <select class="valName" name="receiptProvinceCode" ng-model="receiptProvinceCode" ng-options="x.code as x.name for x in data.areaList"  ng-change="rcode()">
                <option value="">--选择省份--</option>
            </select>
        </div>
        <div class="layui-input-inline">
            <select class="valName" name="receiptCityCode" ng-model="receiptCityCode" ng-options="x.code as x.name for x in receiptCityList"  ng-change="rcity()">
                <option value="">--选择城市--</option>
            </select>
        </div>
        <div class="layui-input-inline">
            <select class="valName" name="receiptCountyCode" ng-model="receiptCountyCode" ng-options="x.code as x.name for x in receiptCountyList" >
                <option value="">--选择区县--</option>
            </select>
        </div>
        <div class="layui-inline">
            <label class="layui-form-label">运单状态</label>
            <div class="layui-input-inline">
                <select class="valName" ng-init="selectedName = orderOptions[0]" ng-model="status" ng-options="x.id as x.name for x in orderOptions">
                    <option value="">--选择运单状态--</option>
                </select>
            </div>
        </div>
    </div>
    <div class="layui-form-item">
        <label class="layui-form-label">委托日期</label>
        <div class="layui-input-inline">
            <input class="layui-input valName" placeholder="开始日期" ng-model="createTimeStart" ng-click="getTime($event,'createTimeStart')" readonly="readonly">
        </div>
        <div class="layui-input-inline">
            <input class="layui-input valName" placeholder="截止日期" ng-model="createTimeEnd" ng-click="getTimeEnd($event,'createTimeEnd')" readonly="readonly">
        </div>
        <div class="layui-input-inline" style="visibility: hidden">
            <input class="layui-input valName">
        </div>
        <div class="layui-inline">
            <label class="layui-form-label">运单号</label>
            <div class="layui-input-inline">
                <input type="tel" name="waybillCode" lay-verify="required|number" autocomplete="off" class="layui-input valName" ng-model="waybillCode">
            </div>
        </div>
    </div>
    <div class="layui-input-inline" style="text-align: center;width: 100%;">
        <button class="layui-btn layui-btn-normal" ng-click="resetBtn()">重置</button>
        <button class="layui-btn" ng-click="seaBtn()">查询</button>
    </div>
</div>
<div style="overflow-x:auto;">
    <table class="layui-table" style="min-width: 1400px;max-width: 2000px;margin-bottom: 0;" >
        <tr>
            <th><input type="checkbox" ng-model="selectAll" ng-click="all(selectAll)"></th>
            <th>运单号</th>
            <th>承运人</th>
            <th>委托日期</th>
            <th>运单起运地</th>
            <th>运单目的地</th>
            <th>数量</th>
            <th>距离</th>
            <th>价格</th>
            <th>状态</th>
            <th>运达日期</th>
            <th>调整次数</th>
        </tr>
        <tr ng-repeat="x in data.waybillDetailList">
            <td><input type="checkbox" ng-checked="selectAll" ng-model="person.state" ng-click="select(selected)" name="id_name" value="{{ x.id}}"></td>
            <td ng-bind="x.waybillCode"></td>
            <td ng-bind="x.carrierName"></td>
            <td ng-bind="x.createTime.substring(0,11)"></td>
            <td ng-bind="x.wdepartProvinceName+ '-' + x.wdepartCityName"> </td>
            <td ng-bind="x.wreceiptProvinceName + '-' +x.wreceiptCityName" ></td>
            <td ng-bind="x.amount"></td>
            <td ng-bind="x.distance"></td>
            <td ng-click="adjustBtn()"><a ng-bind="x.cost==null ? '0' : x.cost" style="color:red;cursor:pointer;text-decoration: underline;"></a></td>
            <td ng-bind="x.status==20 ? '已接单':(x.status==30 ? '待提车' :(x.status==40 ? '已提车' :(x.status==50 ? '待发车' :(x.status==60 ? '待交车' :(x.status==80 ? '已交车' :(x.status==90 ? '已完成' : ''))))))"></td>
            <td ng-bind="x.arriveDate.substring(0,11)"></td>
            <td ng-bind="x.modifyNum"></td>
        </tr>
    </table>
</div>
<div style="float:right;">
    <ul class="layui-box layui-laypage layui-laypage-default">
        <li>
            <a ng-class="{true:'layui-btn-disabled'}[p_current==1]" href="javascript:void(0);" ng-click="p_index(this)">首页</a>
        </li>
        <li>
            <a ng-class="{true:'layui-btn-disabled'}[p_current==1]" href="javascript:void(0);" ng-click="prev_page(this)">上一页</a>
        </li>
        <%--这块是显示多少页的--%>
        <li ng-repeat="page in pages" ng-class="{true:'active'}[p_current==page]">
            <a class="layui-laypage-curr" href="javascript:void(0);" ng-click="load_page(page)">{{ page }}</a>
        </li>
        <li>
            <a ng-class="{true:'layui-btn-disabled'}[p_current==p_all_page]" href="javascript:void(0);" ng-click="next_page(this)">下一页</a>
        </li>
        <li>
            <a ng-class="{true:'layui-btn-disabled'}[p_current==p_all_page]" href="javascript:void(0);" ng-click="p_last()">尾页</a>
        </li>
    </ul>
    <span>共{{count}}条</span>
    <span style="padding-left: 10px;">到第
        <input id="on" type="text" value="{{p_current}}"/>页
        <button class="layui-btn layui-btn-small" ng-click="goBtn()" style="margin-top: -5px;">确定</button>
    </span>
</div>
<input type="hidden" id="orderCost" value="">
<input type="hidden" id="aftCost" value="">
<input type="hidden" id="distance" value="">
<input type="hidden" id="aftDistance" value="">
<input type="hidden" id="comment" value="">




